package org.ch02.job.test12;

/**
 * @author XCH
 * @date 2025 - 03 - 19
 */
public class MainTset {
    public static void main(String[] args) {
        //设置何意对象的属性值
        Student Student1 = new Student();
        BeanUtil.setProperty(Student1, "name", "John Doe");
        BeanUtil.setProperty(Student1, "age", 30);
        //复制某个对象的属性值到另一个对象中
        Student Student2 = new Student();
        BeanUtil.copyProperties(Student1, Student2);
        //获取任意对象的属性值
        System.out.println(BeanUtil.getProperty(Student2, "name"));
        System.out.println(BeanUtil.getProperty(Student2, "age"));
    }
}
